<?php
//var_dump();
class UserStatus extends BaseModel
{
	public $res;
	public $expire;
	public function getSource()
    {
				return "f_user_status";
    }
	public function initialize()
	{
//		 parent::initialize();

	} 
	public function FindByUserId($id){
		$res = $this->findFirstByUserId($id);
		if(empty($res)){
		    $add['user_id'] = $id;
		    $this->save($add);
		    return $this->findFirstByUserId($id);
		}else{
		    return	$res;
		}
	}

	}
